package events
{
	import flash.events.Event;
	
	import interactive.HandType;

	/**
	 *
	 * 该类是手势事件的集合 
	 * @author Raykid
	 * 
	 */
	public class GestureEvent extends Event
	{
		public static const CLICK				: String = "gClick";		// 点击事件，等同于鼠标单击事件
		public static const DOUBLE_CLICK		: String = "gDoubleClick";	// 双击事件，等同于鼠标双击事件
		public static const MOVE				: String = "gMove";			// 移动事件，等同于鼠标按下状态的拖动事件
		public static const TOUCH				: String = "gTouch";		// 触摸事件，相当于鼠标按下事件
		public static const LEAVE				: String = "gLeave";		// 离开事件，相当于鼠标松开事件
		public static const HAND				: String = "gHand";			// 鼠标手势
		
		private var _gestureTarget				: Object;
		private var _stageX						: Number;
		private var _stageY						: Number;
		private var _handType					: int;
		
		public function get stageX():Number {
			return _stageX;
		}
		public function get stageY():Number {
			return _stageY;
		}
		public function get handType():int {
			return _handType;
		}
		public function get gestureTarget():Object {
			return _gestureTarget;
		}
		
		public function GestureEvent(type:String,
									 target:Object,
									 bubbles:Boolean = true,
									 cancelable:Boolean = false,
									 stageX:Number = NaN,
									 stageY:Number = NaN,
									 handType:int = HandType.HAND_NONE)
		{
			_stageX = stageX;
			_stageY = stageY;
			_gestureTarget = target;
			_handType = handType;
			super(type, true, false);
		}
	}
}